package com.gxa.learning.core.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 题目实体类
 *
 * @Author ChenJ
 * @date 2021/12/02 14:19
 **/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Table(name = "tb_question")
@ApiModel
public class Question implements Serializable {

    /**
     * 题目编号
     */
    @Id
    @Column(name = "question_id")
    @ApiModelProperty(name = "id", value = "id", dataType = "Long", example = "题目编号")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 题目标题（问题）
     */
    @Column(name = "question_title", unique = true)
    @ApiModelProperty(name = "title", value = "title", dataType = "String", example = "题目标题（问题）")
    private String title;

    /**
     * 题目类型：1.单选题 2.判断题
     */
    @Column(name = "question_type", unique = true)
    @ApiModelProperty(name = "type", value = "type", dataType = "Integer", example = "题目类型：1.单选题 2.判断题")
    private Integer type;

    /**
     * 等级id 关联等级表 获取等级
     */
    @Column(name = "level_id", unique = true)
    @ApiModelProperty(name = "lmId", value = "lmId", dataType = "Long", example = "等级id 关联等级表 获取等级")
    private Long lId;

    /**
     * 题目分值
     */
    @Column(name = "question_core", unique = true)
    @ApiModelProperty(name = "core", value = "core", dataType = "Integer", example = "题目分值")
    private Integer core;

    /**
     * 选择题：A选项
     */
    @Column(name = "question_item1")
    @ApiModelProperty(name = "item1", value = "item1", dataType = "String", example = "选择题：A选项")
    private String item1;

    /**
     * 选择题：B选项
     */
    @Column(name = "question_item2")
    @ApiModelProperty(name = "item2", value = "item2", dataType = "String", example = "选择题：B选项")
    private String item2;

    /**
     * 选择题：C选项
     */
    @Column(name = "question_item3")
    @ApiModelProperty(name = "item3", value = "item3", dataType = "String", example = "选择题：C选项")
    private String item3;

    /**
     * 选择题：D选项
     */
    @Column(name = "question_item4")
    @ApiModelProperty(name = "item4", value = "item4", dataType = "String", example = "选择题：D选项")
    private String item4;

    /**
     * 题目的参考答案
     */
    @Column(name = "question_answer", unique = true)
    @ApiModelProperty(name = "answer", value = "answer", dataType = "String", example = "题目的参考答案")
    private String answer;

    /**
     * 题库编号 关联题库
     */
    @Column(name = "questionBank_id")
    @ApiModelProperty(name = "questionBankId", value = "questionBankId", dataType = "Long", example = "题库编号 关联题库")
    private Long questionBankId;

}
